package pack0719.cn;

public class Test {
    public static void main(String[] args) {
        Stack stack=new Stack();

        //存放数据
        stack.push(2);
        stack.push(4);
        stack.push(6);
        stack.push(8);
        stack.push(10);
        stack.push(12);
        stack.push(14);

        //显示所有数据
        stack.display();

        //获取真实大小
        System.out.println("---------------------");
        System.out.println(stack.size());

        //弹出栈顶元素
        System.out.println(stack.pop());

        //删除顶部的元素
        System.out.println("----------------------");
        stack.remove();
        stack.display();

        //删除指定的某个元素
        System.out.println("-----------------------");
        stack.remove(10);
        stack.display();
    }
}
